<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>权限分配</title>
<link href="${pageContext.request.contextPath}/static/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/static/bootstrap-3.3.7-dist/css/bootstrap-table.css" rel="stylesheet">
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery-3.3.1.js"></script>
<script	type="text/javascript" src="${pageContext.request.contextPath}/static/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
<script	type="text/javascript" src="${pageContext.request.contextPath}/static/bootstrap-3.3.7-dist/js/bootstrap-table.js"></script>
<script	type="text/javascript" src="${pageContext.request.contextPath}/static/bootstrap-3.3.7-dist/locale/bootstrap-table-zh-CN.js"></script>
</head>
<script>
	$(function(){
		$("#table").bootstrapTable({
			url:"${pageContext.request.contextPath}/PermissionList",
			toolbar:"#toolbar",
			method:"post",
			dataType:"json",
			sidePagination:"server",
			pagination : true,//设置为 true 会在表格底部显示分页条
			paginationLoop : true,//设置为 true 启用分页条无限循环的功能。
			pageNumber:1,
			pageSize:11,
			pageList:[ 3, 6, 9],
			contentType:"application/x-www-form-urlencoded",
			queryParamsType : "",
			//请求服务器数据
			queryParams : queryParams,
			columns:[
				{
					checkbox:true
				},
				{
					field:"permissionName",
					title:"姓名",
					align:"center"
				},
				{
					field:"id",
					title:"编号",
					align:"center"
				},
				{
					field:"cz",
					title:"操作",
					align:"center"
				}
			]
		})
	})
	function queryParams(params){
		var param={
			pageNumber:params.pageNumber-1,
			pageSize:params.pageSize
		}
		return param;
	}
</script>
<body>
<div class="col-sm-12 col-md-12">
		<div class="main-container">
		<div class="panel panel-default" style="margin: 0;padding: 0">
			<div class="panel-body">
				<form role="form" class="form-inline">
					<div class="form-group"></div>
					<select id="cid" class="form-control input-sm">
						<option value="">-请选择-</option>
					</select>
					<div class="form-group">
						<button class="btn btn-reset  glyphicon glyphicon-globe"
							type="button" ">分配权限</button>
					</div>
					<div class="form-group">
						<button class="btn btn-success glyphicon glyphicon-hourglass"
							type="button" ">添加角色</button>
					</div>
				</form>
					</div>
		</div>
			<div id="toolbar">
				<button class="btn btn-info btn-gt glyphicon glyphicon glyphicon-circle-arrow-up" data-toggle="modal"  data-target="#update" onclick="Upd()">修改</button>
				<button class="btn btn-success btn-gt glyphicon glyphicon-asterisk" onclick="del()">删除</button>
			</div>
			<table id="table" ></table>
			
		</div>
	</div>
</body>
</html>